package com.fqgj.xjd.user.integration.ocr.adapter;

import com.alibaba.fastjson.annotation.JSONField;
import com.fqgj.xjd.user.client.response.OcrVoteridBack;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapter;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapterAddressBean;
import com.fqgj.xjd.user.integration.ocr.adapter.basic.BasicAdapterBean;

/**
 * ·
 *
 * @author liuming
 * Created on 上午11:19 2019/1/3.
 */
public class VoteridBackAdapter extends BasicAdapter<OcrVoteridBack> {

    @JSONField(name = "pin")
    private BasicAdapterBean pin;

    @JSONField(name = "dob")
    private BasicAdapterBean dob;

    @JSONField(name = "gender")
    private BasicAdapterBean gender;

    @JSONField(name = "age")
    private BasicAdapterBean age;

    @JSONField(name = "voterid")
    private BasicAdapterBean voterid;

    @JSONField(name = "date")
    private BasicAdapterBean date;

    @JSONField(name = "type")
    private BasicAdapterBean type;

    @JSONField(name = "address")
    private BasicAdapterAddressBean address;

    public BasicAdapterBean getPin() {
        return pin;
    }

    public VoteridBackAdapter setPin(BasicAdapterBean pin) {
        this.pin = pin;
        return this;
    }

    public BasicAdapterBean getDob() {
        return dob;
    }

    public VoteridBackAdapter setDob(BasicAdapterBean dob) {
        this.dob = dob;
        return this;
    }

    public BasicAdapterBean getGender() {
        return gender;
    }

    public VoteridBackAdapter setGender(BasicAdapterBean gender) {
        this.gender = gender;
        return this;
    }

    public BasicAdapterBean getAge() {
        return age;
    }

    public VoteridBackAdapter setAge(BasicAdapterBean age) {
        this.age = age;
        return this;
    }

    public BasicAdapterBean getVoterid() {
        return voterid;
    }

    public VoteridBackAdapter setVoterid(BasicAdapterBean voterid) {
        this.voterid = voterid;
        return this;
    }

    public BasicAdapterBean getDate() {
        return date;
    }

    public VoteridBackAdapter setDate(BasicAdapterBean date) {
        this.date = date;
        return this;
    }

    public BasicAdapterBean getType() {
        return type;
    }

    public VoteridBackAdapter setType(BasicAdapterBean type) {
        this.type = type;
        return this;
    }

    public BasicAdapterAddressBean getAddress() {
        return address;
    }

    public VoteridBackAdapter setAddress(BasicAdapterAddressBean address) {
        this.address = address;
        return this;
    }

    @Override
    public OcrVoteridBack doAdapter() {
        OcrVoteridBack ocrVoteridBack = new OcrVoteridBack();
        ocrVoteridBack.setAddress(this.address.getValue());
        ocrVoteridBack.setPin(this.pin.getValue());
        ocrVoteridBack.setType(this.type.getValue());
        ocrVoteridBack.setVoterid(this.voterid.getValue());
        return ocrVoteridBack;
    }
}
